-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monte Carlo acquisition functions #48
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good improvement overall. I have a few suggestions below to document the code better and have better test coverage.
def probabilities(self, x, n_samples=256): | ||
def probabilities(self, x, n_samples=1024): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What caused the default to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, this should probably be lower. It samples a Dirichlet distribution n_samples
times in constructing the classification model.
monte_carlo_upper_confidence_bound: | ||
default_args: | ||
beta: 4 | ||
description: The expected value, plus some multiple of the uncertainty (typically \mu + 2\sigma). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe the MC effect/benefit here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I explain it here? It applies to all the MC acquisition functions (which is that it run faster, more robust and can run in parallel), which we should definitely put somewhere.
acq_func_identifier: which acquisition function to use | ||
n: how many points to get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make it numpydoc
-compatible: https://numpydoc.readthedocs.io/en/latest/format.html#parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll put numpydoc docstrings on all the agent methods in the next PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! The docs updates will be covered by #50.
Monte Carlo acquisition functions
This PR adds more Monte Carlo acquisition functions, which should be preferred to analytic ones (as they are faster to optimize and more robust).